import request from '../request'
import globalConfig from "../config";
import {praseStrEmpty} from '@/common/utils'

export function getJobListPage(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.getJobList}`,
        method: 'get',
        params: data
    })
}
// 恢复
export function editJob(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.editJob}`,
        method: 'post',
        params: data
    })
}
export function pauseJob(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.pauseJob}`,
        method: 'post',
        params: data
    })
}
export function resumeJob(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.resumeJob}`,
        method: 'post',
        params: data
    })
}
export function addJob(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.addJob}`,
        method: 'post',
        params: data
    })
}
export function trigger(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.job.trigger}`,
        method: 'post',
        params: data
    })
}
